$(function() {
    $(".like, .remove").click(function(e) {

        var id = $(this).closest('.box').data('id');
        var url = $(this).attr('class') + ".php?id=" + id;
        // a click on like will generate a url: like.php?id=1
        alert(id);

    });
});

